package com.cys.dm.client.user;

import com.cys.dm.entity.user.DmLinkUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author blue_t
 * @date 2020-12-23 18:25
 */
@FeignClient(name = "dm-user-provider")
public interface DmLinkUserClient {
    
    @PostMapping(path = "/user/findAllByUserId/{userId}")
    public List<DmLinkUser> findAllByUserId(@PathVariable("userId")Long userId);

    @PostMapping(path = "/user/queryLinkUserByIdCard/{idCard}")
    public DmLinkUser queryLinkUserByIdCard(@PathVariable("idCard")Long idCard);

    @PostMapping(path = "/user/addLinkUser")
    public Integer addLinkUser(@RequestBody DmLinkUser dmLinkUser);

    @PostMapping(path = {"/user/findLinkUserByIdCard/{idCard}"})
    public DmLinkUser findLinkUserByIdCard(@PathVariable("idCard")Long idCard);

}
